<?php
namespace Widget;
use Minutes\Widget;
use Model\Tag;
class PostTags extends Widget
{
    public function __construct($data, $properties) {
        parent::__construct($data, $properties);
        $this->widgetView = 'postTags';
    }

    public function run() {
        if (isset($this->properties['postId'])) {
            $modelTag = new Tag();
            $this->data['postTags'] = $modelTag->getTags($this->properties['postId']);
        } else {
            throw new \Exception('Wrong paginator specified for widget');
        }

    }
}
